﻿<?xml version="1.0" encoding="utf-8" ?>
<testSuite name="The Query TestSuite" xmlns="http://NBi/TestSuite">
	<settings>
		<default apply-to="system-under-test">
			<connectionString>Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;User Id=sqlfamily;password=sqlf@m1ly</connectionString>
		</default>
	</settings>
	<test name="From file" uid="0000">
		<setup>
			<etl-run path="/Etl/" name="Sample.dtsx" password="p@ssw0rd"/>
		</setup>
		<system-under-test>
			<execution>
				<report source="Data Source=(local)\SQL2012;Initial Catalog=ReportServer;Integrated Security=True;"
						path="/AdventureWorks Sample Reports/"
						name="Currency_List"
						dataset="currency"
						connectionString="Data Source=tadam;Initial Catalog=AdventureWorks2012;User Id=sqlfamily;password=sqlf@m1ly"
				/>
			</execution>
		</system-under-test>
		<assert>
			<equalTo>
				<resultSet>
					<row>
						<cell>EURO</cell>
					</row>
					<row>
						<cell>American Dollar</cell>
					</row>
				</resultSet>
			</equalTo>
		</assert>
	</test>
	<test name="From SQL Server" uid="0001">
		<setup>
			<etl-run server="." path="Etl\" name="Sample"/>
		</setup>
		<system-under-test>
			<execution>
				<report source="Data Source=(local)\SQL2012;Initial Catalog=ReportServer;Integrated Security=True;"
						path="/AdventureWorks Sample Reports/"
						name="Currency_List"
						dataset="currency"
						connectionString="Data Source=tadam;Initial Catalog=AdventureWorks2012;User Id=sqlfamily;password=sqlf@m1ly"
				/>
			</execution>
		</system-under-test>
		<assert>
			<equalTo>
				<resultSet>
					<row>
						<cell>EURO</cell>
					</row>
					<row>
						<cell>American Dollar</cell>
					</row>
				</resultSet>
			</equalTo>
		</assert>
	</test>
	<test name="From File in System-under-tst" uid="0002">
		<system-under-test>
			<execution>
				<etl path="/Etl/" name="Sample.dtsx"/>
			</execution>
		</system-under-test>
		<assert>
			<successful/>
		</assert>
	</test>
	<test name="From File in System-under-tst" uid="0003">
		<system-under-test>
			<execution>
				<etl server="." path="Etl\" name="Sample"/>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
	<test name="With parameters" uid="0004">
		<system-under-test>
			<execution>
				<etl path="Etl\" name="Sample">
					<parameter name="param1">value1</parameter>
					<parameter name="param2">value2</parameter>
				</etl>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
	<test name="Setup with parameters" uid="0005">
		<setup>
			<etl-run path="/Etl/" name="Sample.dtsx">
				<parameter name="param1">value1</parameter>
				<parameter name="param2">value2</parameter>
			</etl-run>
		</setup>
		<system-under-test>
			<execution>
				<query file="foo.sql"/>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
	<test name="From Sql Server with SQL Server authentication" uid="0006">
		<system-under-test>
			<execution>
				<etl server="." path="/Etl/" name="Sample" username="sa" password="p@ssw0rd"/>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
	<test name="From SSISDB Catalog" uid="0007">
		<system-under-test>
			<execution>
				<etl server="." catalog="SSISDB" folder="Folder" project="Project" name="Sample"/>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
	<test name="From SSISDB Catalog with 32 bits" uid="0008">
		<system-under-test>
			<execution>
				<etl server="." catalog="SSISDB" folder="Folder" project="Project" name="Sample" bits-32="true"/>
			</execution>
		</system-under-test>
		<assert>
			<fasterThan max-time-milliSeconds="10000"/>
		</assert>
	</test>
</testSuite>
